<%@ page language="java" contentType="text/html; charset=utf-8" isELIgnored="false"
    pageEncoding="utf-8"%>
 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
	 <%int i = 1; %>
  <div id="workspace" class="col-md-8">
  <div class="table-responsive">
   <table  class="table table-striped">
   <c:choose>
   	<c:when test="${sessionScope.queryMyAll ne null}">
	<caption>本单位旗下的所有资产:</caption>
	<thead>
		<tr>
			<th>编号</th>
			<th>名字</th>
			<th>种类</th>
			<th>数量</th>
			<th>地址</th>
			<th>采购人</th>
			<th>采购价格</th>
			<th>审核状态</th>
			<th>入库时间</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach var="asset" items="${sessionScope.queryMyAll }">
		<tr class="info">
			<td>${asset.id }</td>
			<td>${asset.name }</td>
			<td>${asset.category }</td>
			<td>${asset.number }</td>
			<td>${asset.address }</td>	
			<td>${asset.purchaser }</td>
			<td>${asset.purchasingValue }</td>
			<c:if test="${asset.state == '1' }"><td>审核中</td><td>xxxx-xx-xx</td>	</c:if>
			<c:if test="${asset.state == '0' }"><td>已通过</td><td>${asset.storageTime }</td>	</c:if>
		</tr>
		</c:forEach>
		<%session.removeAttribute("queryMyAll"); %> 
	</tbody>
	</c:when>
	<c:when test="${sessionScope.queryAssetAccount ne null }">
	<caption>资产相关账目:</caption>
	<thead>
		<tr>
			<th>编号</th>
			<th>名字</th>
			<th>种类</th>
			<th>数量</th>
			<th>入库时间</th>
			<th>入库价格</th>
			<th>出库时间</th>
			<th>出库价格</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach var="asset" items="${sessionScope.queryAssetAccount }">
		<tr class="info">
			<td>${asset.id }</td>
			<td>${asset.name }</td>
			<td>${asset.category }</td>
			<td>${asset.number }</td>
			<td>${asset.storageTime }</td>	
			<td>${asset.orginalPrice }</td>	
			<td>${asset.sellTime }</td>	
			<td>${asset.sellPrice }</td>
		</tr>
		</c:forEach>
		<%session.removeAttribute("queryAssetAccount"); %> 
	</tbody>
	</c:when>
	<c:when test="${sessionScope.queryMyAllRepair ne null }">
		<caption>资产维修名单:(编号相同的维修时间不一样)</caption>
	<thead>
		<tr>
			<th>编号</th>
			<th>名字</th>
			<th>地点</th>
			<th>维修数量</th>
			<th>维修人</th>
			<th>维修价格</th>
			<th>操作</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach var="asset" items="${sessionScope.queryMyAllRepair }">
		<c:if test="${asset.auditor == null }">
		<tr class="info">
			<td>${asset.id }</td>
			<td>${asset.name }</td>
			<td>${asset.address }</td>
			<td>${asset.number2 }</td>
			<td>${asset.repair }</td>	
			<td>${asset.cost }</td>	
			<td>
				<a href="../worker.con?work=endRepair&id=${asset.id }&name=${asset.name }&address=${asset.address}&number2=${asset.number2 }&repair=${asset.repair }&cost=${asset.cost }"  class="tooltip-show" data-toggle="tooltip" title="结束维修状态"><span class="glyphicon glyphicon-arrow-right"></span></a> 
			</td>	
		</tr>
		</c:if>
		</c:forEach>
		<%session.removeAttribute("queryMyAllRepair"); %> 
	</tbody>
	</c:when>
   </c:choose>
   </table>
   </div>
  </div>
</body>
</html>